package com.yulinlin.jdbc.model;

import com.yulinlin.jdbc.model.wrapper.ModelDeleteWrapper;
import com.yulinlin.jdbc.model.wrapper.ModelUpdateWrapper;
import com.yulinlin.jdbc.model.wrapper.ModelInsertWrapper;

/**
 * 基础crud模型
 * @param <E>
 */
public abstract class AbstractModel<E> extends AbstractQueryModel<E> {

    //删除构造器
    public ModelDeleteWrapper createDeleteWrapper(){
        return ModelDeleteWrapper.newInstance(this);
    }

    //更新构造器
    public ModelUpdateWrapper createUpdateWrapper(){
        return ModelUpdateWrapper.newInstance(this);
    }

    //插入构造器
    public ModelInsertWrapper createInsertWrapper(){
        return ModelInsertWrapper.newInstance(this);
    }


}

